let arr = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
let date = new Date();
//使用Date对象，输出当前日期5天之后是星期几
let year = date.getFullYear()
let month = date.getMonth() + 1;
let dayOfmonth = date.getDate() + 5;

date = new Date(year + '-' + month + '-' + dayOfmonth)
let dayOfweek = date.getDay();

document.write('5天后是：' + arr[dayOfweek])